
public class Device {
	
	/****************************************
	 * Attributes
	 ****************************************/
	protected int address;
	protected iCATch316 iCatch;
	
	// Device identifiers (address)
	// Output Devices
	public static final int LED = 114;
	public static final int VIBRATION_MOTOR = 92;
	public static final int BUZZER = 80;
	
	// Input Devices
	public static final int JOYSTICK = 42;
	public static final int LIGHT_SENSOR = 16;
	public static final int RESISTANCE_SENSOR = 48;
	public static final int ULTRASONIC_SENSOR = 138;
	
	
	/****************************************
	 * Constructor
	 ****************************************/
	public Device(int address, iCATch316 iCatch) {
		this.address = address;
		this.iCatch = iCatch;
	}
	
	// Methods
	/****************************************
	 * Return this device's address
	 ****************************************/
	public int getAddress() {
		return address;
	}
	
	
	/****************************************
	 * Check whether this device is an input device
	 ****************************************/
	public boolean isInputDevice() {
		return ((address == Device.JOYSTICK) || 
				(address == Device.LIGHT_SENSOR) || 
				(address == Device.RESISTANCE_SENSOR) || 
				(address == Device.ULTRASONIC_SENSOR));
	}
	
}
